<!--This file is the User Interface only for Upload-->
<?php
session_start();
?>

<!--RAC-UploadUI.php is the UI for uploading files.-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>Rotaract DLSU</title>
        <meta http-equiv="Content-Type" content="text/html"/>
        <meta name="robots" content="index,follow"/>
        <meta name="distribution" content="global"/>
        <meta name="description" content=""/>
        <meta name="keywords" content=""/>
        <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body>
        <!--        This part is the user interface-->
        <div id="container2">
            <div id="main2">
                <br>
                    <center>
                        <table width="100%" cellspacing="0" cellpadding="0">
                            <tr>
                                <td class="main_nav">
                                    <div id="main_text2">

                                        <p style="color: white">*Only template files with the extensions 
                                            gif,jpeg,png,jpg,zip,pdf,doc,dot,docx,xls,xlt,xla,xlsx,
                                            xltx,ppt,pot,pps,ppa,pptx,potx,ppsx, txt and exe are allowed.</p><br>
                                            <img src="images/uploadicon.png" height="80" width="80  " /><h2 style="color:white;">Upload Files</h2><br>
                                                <form enctype = "multipart/form-data" name="uploadfile" action="<?php echo $_SERVER['PHP_SELF'] ?>" method ="POST">
                                                    <input type="file" name="uploadfile" size="30" style="color: white;"/>
                                                    
                                                    <p>Description:</p>
                                                    <textarea cols="40" rows="5" name="desc">
                                                    </textarea><br></br>
                                                    <input type="submit" name="upload" value="UPLOAD" />
                                                </form>
                                                <!--                            Printing the confirmation message.
                                                                                $confirm variable comes from the Logic file which is the RAC-Registration.php-->
                                                <?php
                                                $confirm = '';
                                                if (isset($_POST['upload'])) {
                                                    include 'RAC-Upload.php';

                                                    if ($confirm) {
                                                        echo "<h4>Upload Successful!</h4>";
                                                    } else {
                                                        echo "<h4>Upload Failed, please check the file extensions allowed above!</h4>";
                                                    }
                                                }
                                                ?>
                                                </div>
                                                </td>
                                                </tr>
                                                </table>
                                                </div>
                                                </div>
                                                </body>
                                                </html>